﻿<Window x:Class="Suunto2EndomondoTestApp.Suunto2EndomondoTestApplication"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Suunto2Endomondo" Height="450" Width="420">
    <StackPanel Orientation="Vertical">
        <StackPanel DockPanel.Dock="Top" Orientation="Horizontal" Height="70">
            <Image Height="auto" Width="auto" Source="Images\SuuntoLogo.jpg"/>
            <Image Height="auto" Width="auto" Source="Images\EndomondoLogo.jpg"/>
        </StackPanel>
        
        <TextBlock Text="Suunto2Endomondo Test Application" Margin="0,10,0,0" HorizontalAlignment="Center"/>

        <TextBlock Text="Select a Suunto Ambit source file or fill in user defined data, fill in your Endomondo credentials and click Create workout." 
                   Margin="10" TextWrapping="Wrap"/>

        <StackPanel Margin="10,20,10,0">                      
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="100"/>
                    <ColumnDefinition Width="120"/>
                    <ColumnDefinition />                    
                </Grid.ColumnDefinitions>
                <Button Name="selectSuuntoFile" Grid.RowSpan="4" Click="selectSuuntoFile_Click" Margin="0,10,10,10">
                    <TextBlock>
                        Select Suunto<LineBreak/>workout file
                    </TextBlock>
                </Button>
                <Label Grid.Row="0" Grid.Column="1" Content="Date (yyyy-MM-dd):"/>
                <Label Grid.Row="1" Grid.Column="1" Content="Activity ID:"/>
                <Label Grid.Row="2" Grid.Column="1" Content="Duration (h:m:s):"/>
                <Label Grid.Row="3" Grid.Column="1" Content="Distance (km):"/>
                <Label Grid.Row="4" Grid.Column="1" Content="Comment:"/>
                <TextBox Name="dateTextBox" Grid.Column="2" Grid.Row="0" Margin="3"/>
                <TextBox Name="activityTextBox" Grid.Column="2" Grid.Row="1" Margin="3"/>
                <Grid Grid.Row="2" Grid.Column="2">
                    <Grid.RowDefinitions>
                        <RowDefinition/>                        
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition/>
                        <ColumnDefinition/>
                        <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <TextBox Name="durationTextBoxHours" Grid.Column="0" Grid.Row="0" Margin="3"/>
                    <TextBox Name="durationTextBoxMinutes" Grid.Column="1" Grid.Row="0" Margin="3"/>
                    <TextBox Name="durationTextBoxSeconds" Grid.Column="2" Grid.Row="0" Margin="3"/>
                </Grid>
                
                <TextBox Name="distanceTextBox" Grid.Column="2" Grid.Row="3" Margin="3"/>
                <TextBox Name="commentTextBox" Grid.Column="2" Grid.Row="4" Margin="3"/>
            </Grid>
            <TextBlock Name="selectedSuuntoFileLog" Height="Auto" TextWrapping="Wrap"/>
        </StackPanel>
        <StackPanel Margin="10,20,10,0">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="140"/>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="80"/>
                </Grid.ColumnDefinitions>
                <Label Grid.Row="0" Grid.Column="0" Content="Endomondo Username:"/>
                <Label Grid.Row="1" Grid.Column="0" Content="Endomondo Password:"/>
                <TextBox Name="usernameTextBox" Grid.Column="1" Grid.Row="0" Margin="3"/>
                <PasswordBox Name="passwordTextBox" Grid.Column="1" Grid.Row="1" Margin="3"/>
                <Button Name="createManualWorkoutFromFile" Grid.Column="2" Grid.Row="0" Grid.RowSpan="2" Margin="10,0,0,0" Click="createManualWorkoutFromFile_Click">
                    <TextBlock TextWrapping="Wrap">
                        Create workout
                    </TextBlock>
                </Button>
            </Grid>
            <TextBlock Name="createdWorkoutLog" TextWrapping="Wrap"/>
        </StackPanel>
    </StackPanel>
</Window>
